/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view.contents.transition;

import view.contents.ImageTransitioner;

/**
 * 
 * @author Yang Wang <yang@digitalmenubox.com>
 */
public class RandomTransition implements ImageTransition {

	@Override
	public void animate(ImageTransitioner box, int time) {

		int index = (int) (Math.random() * 11);
		System.out.println("Transition number: " + index);
		switch (index) {
		case 0:
			new CircleOut(box).animate(box, time);
			break;
		case 1:
			new FadeIn(box).animate(box, time);
			break;
		case 2:
			new GravityDropDown(box).animate(box, time);
			break;
		case 3:
			new SlideDown(box).animate(box, time);
			break;
		case 4:
			new SlideUp(box).animate(box, time);
			break;
		case 5:
			new SlideRight(box).animate(box, time);
			break;
		case 6:
			new SlideLeft(box).animate(box, time);
			break;
		case 7:
			new WipeUp(box).animate(box, time);
			break;
		case 8:
			new WipeDown(box).animate(box, time);
			break;
		case 9:
			new WipeLeft(box).animate(box, time);
			break;
		case 10:
			new WipeRight(box).animate(box, time);
			break;
		// case 11:
		// new GravityBouncer(box).animate(box, time);
		// break;
		// case 12:
		// new BoxOut(box).animate(box, time);
		// break;
		default:
			new GravityBouncer(box).animate(box, time);
		}
	}
}
